<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <title>流式布局</title>
        <style>
            * {
                margin: 0;
                padding: 0;
            }

            section {
                width: 100%;
                max-width: 980px; /* 最大宽度 */
                min-width: 320px; /* 最小宽度 */
                margin: 0 auto;
            }

            section div {
                float: left;
                width: 50%;
                height: 400px;
            }

            section div:nth-child(1) {
                background-color: pink;
            }

            section div:nth-child(2) {
                background-color: purple;
            }
        </style>
    </head>

    <body>
        <section>
            <div></div>
            <div></div>
        </section>
    </body>
</html>
